PoC Auto-Update with Netsparkle Updater #2998
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation - see #2997. This is a PoC only! No intention to merge.
Reason for choosing Netsparkle over others: signature validation of update files (SSL these days doesn't mean a thing, and evilginx2 and friends are way too easy to use to fake update files)
Notes for using Netsparkle
Install dotnet tool for Netsparkle
dotnet tool install --global NetSparkleUpdater.Tools.AppCastGenerator
Create keys
netsparkle-generate-appcast --generate-keys --key-path ./signingkeys
Create appcast
netsparkle-generate-appcast -n "ILSpy" -a ./output -e msi -b ./ -o windows -f true -u https://github.com/icsharpcode/ILSpy/releases/tag/v8.0 --description-tag ".NET Decompiler" --key-path ./signingkeys --change-log-path ./
This assumes
ILSpy_Installer_8.0.0.7400.msi
and8.0.0.7400.md
(both files entirely fake) in the root folder where the command is run.Notes for deploying the appcast
When you add release notes to the appcast, it will contain newlines, eg https://github.com/icsharpcode/ILSpy/blob/11a5bb50682fdf31c08a01e0937673ab6faa29a7/appcast.xml. When pushing from Windows and consuming as is the case here on Linux, you need
appcast.xml eol=crlf
in https://github.com/icsharpcode/ILSpy/blob/11a5bb50682fdf31c08a01e0937673ab6faa29a7/.gitattributesImplementation notes
Comments included address a few of the edge cases found (and some not yet resolved). In general, if going down the route of #2997 we should have one update strategy for checking only, and one for auto-updating (think interface and two implementations that can be used depending on deployment variant)